<div class="caption">
  <% @articles.each do |article| %>
    <div id="log_<%= article.id %>" class="log_monomer">
      <div class="logs_name">
        <%= link_to truncate("#{article.title}", :length => 10),
          show_log_url(article),
          :class => :name,
          :title => article.title,
          :target => :_blanck
      %>
        <a class="picture" href="javascript:;"></a>
      </div>
      <div class="ex">
        <p class="time"><%= time_ago_in_words article.created_at, false %>前 分类：<%= article.documet_type.name %> | </p>
        <p class="r_d_count"> 阅读 (<%= article.browse_records_count %>)</p>
        <p class="r_d_count">评论 (<%= article.post_sessions.length %>)</p>
        <p class="r_d_count">|</p>
        <% if loggined_by? @valleyer %>
          <%= link_to_remote "编辑",
            :update => :logs_replace,
            :url => edit_valleyers_show_logs_show_article_url(article, :current_page => @articles.current_page),
            :html => {
            :id => :edit_log
          },
            :method => :get
        %>
          <%= link_to_remote "删除",
            :update => :logs_replace,
            :url => valleyers_show_logs_show_article_url(article, :page_number => @articles.current_page),
            :confirm => "确认删除?",
            :html => {
            :id => :delete_log,
          },
            :loading => "Effect.Fade('log_#{article.id}')",
            :method => :delete
        %>
        <% end %>
      </div>
      <div class="content">
        <div class="char"><%= truncate("#{strip_tags(article.content)}", :length => 100) %></div>
        <p>
          <a href="javascript:;">分享给好友</a>
          <%= link_to "查看全文",
            show_log_url(article),
            :target => :_blanck
        %>
          <%= link_to_remote "评论",
            :update => "log_reply_#{article.id}",
            :url => new_valleyers_show_logs_show_post_url(
            :valleyer_id => @valleyer.id,
            :article_id => article.id
          ),
            :method => :get,
            :html => {
            :class => "button"
          } if loggined_by_valleyer?
        %>
        </p>
      </div>
      <%= render :file => "valleyers/show/logs/show/posts/_index.html", :locals => { :article => article } %>
    </div>
  <% end %>
</div>
<%= page_turner(:log, @articles) %>
